import RxSwiper from './package/components/RxSwiper.vue'
import RxSwiperDot from './package/components/RxSwiperDot'
import RxSwiperSlider from './package/components/RxSwiperSlider'

function install (Vue) {
  if (install.installed) return
  install.installed = true
  Vue.component(RxSwiper.name, RxSwiper)
  Vue.component(RxSwiperDot.name, RxSwiperDot)
  Vue.component(RxSwiperSlider.name, RxSwiperSlider)
}

const VueSwiper = {
  install: install,
  RxSwiper,
  RxSwiperDot,
  RxSwiperSlider
}

if (typeof window !== 'undefined' && window.Vue) {
  window.Vue.use(VueSwiper)
}

export default VueSwiper
